package com.zengge.zbc.po;

import com.zengge.zbc.utils.SnowFlakeIdGenerator;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

@Table(name = "device_info", indexes = {
        @Index(name = "idx_room_obj_id", columnList = "room_obj_id", unique = false)
})
public class DeviceInfo {

    @Id
    @Column(name = "object_id")
    private long objectId;
    @Column(name = "device_name")
    private String deviceName;
    @Column(name = "mac_address")
    private int macAddress;
    @Column(name = "room_obj_id")
    private long roomObjId;
    @Column(name = "device_cct")
    private long deviceCct;
    @Column(name = "device_Brightness")
    private long deviceBrightness;
    @Column(name = "device_type")
    private String deviceType;


    public DeviceInfo() {
    }

//    public DeviceInfo(String deviceName, int macAddress, long roomObjId, long userObjId) {
//        this.objectId = SnowFlakeIdGenerator.next();
//        this.deviceName = deviceName;
//        this.macAddress = macAddress;
//        this.roomObjId = roomObjId;
//    }

    public DeviceInfo(String deviceName, int macAddress, long roomObjId, long deviceCct, long deviceBrightness, String deviceType, long userObjId) {
        this.objectId = SnowFlakeIdGenerator.next();
        this.deviceName = deviceName;
        this.macAddress = macAddress;
        this.roomObjId = roomObjId;
        this.deviceCct = deviceCct;
        this.deviceBrightness = deviceBrightness;
        this.deviceType = deviceType;
    }

    public long getObjectId() {
        return objectId;
    }

    public void setObjectId(long objectId) {
        this.objectId = objectId;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public int getMacAddress() {
        return macAddress;
    }

    public void setMacAddress(int macAddress) {
        this.macAddress = macAddress;
    }

    public long getRoomObjId() {
        return roomObjId;
    }

    public void setRoomObjId(long roomObjId) {
        this.roomObjId = roomObjId;
    }

    public long getDeviceCct() {
        return deviceCct;
    }

    public void setDeviceCct(long deviceCct) {
        this.deviceCct = deviceCct;
    }

    public long getDeviceBrightness() {
        return deviceBrightness;
    }

    public void setDeviceBrightness(long deviceBrightness) {
        this.deviceBrightness = deviceBrightness;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }
}
